package org.xg.study.pd.test;

import org.junit.Test;
import org.xg.study.pd.XiaoEr;
import org.xg.study.pd.cook.impl.GuangDongCookImpl;
import org.xg.study.pd.cook.impl.JiangSuCookImpl;
import org.xg.study.pd.cook.impl.ShanDongCookImpl;
import org.xg.study.pd.cook.impl.SiChuanCookImpl;
import org.xg.study.pd.cuisine.ICuisine;
import org.xg.study.pd.cuisine.impl.GuangDongCuisineImpl;
import org.xg.study.pd.cuisine.impl.JiangSuCuisineImpl;
import org.xg.study.pd.cuisine.impl.ShanDongCuisineImpl;
import org.xg.study.pd.cuisine.impl.SiChuanCuisineImpl;

import java.util.HashMap;
import java.util.Map;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName ApiTest14_02
 * @date 2021/9/16 14:43
 **/
public class ApiTest14_02 {
    @Test
    public void test_order(){
        // 菜系 + 厨师；广东（粤菜）、江苏（苏菜）、山东（鲁菜）、四川（川菜）
        ICuisine cuisine = new GuangDongCuisineImpl(new GuangDongCookImpl());
        ICuisine cuisine1 = new JiangSuCuisineImpl(new JiangSuCookImpl());
        ICuisine cuisine2 = new ShanDongCuisineImpl(new ShanDongCookImpl());
        ICuisine cuisine3 = new SiChuanCuisineImpl(new SiChuanCookImpl());

        //点单
        XiaoEr xiaoEr = new XiaoEr();
        xiaoEr.order(cuisine);
        xiaoEr.order(cuisine1);
        xiaoEr.order(cuisine2);
        xiaoEr.order(cuisine3);

        //下单
        xiaoEr.placeOrder();
    }
}
